package com.zty.demo;

public class Calc {
	int totalnum=0;
	void add(int num)
	{
		totalnum = totalnum + num;
	}
	void sub(int num)
	{
		totalnum = totalnum - num;
	}
	void mul(int num)
	{
		totalnum = totalnum * num;
	}
	void div(int num)
	{
		totalnum = totalnum / num;
	}
	void clear()
	{
		totalnum = 0;
	}
	void print()
	{
		System.out.println(totalnum);
	}
}
